package com.dingup.paike.bean.dtobean;

import com.dingup.paike.enums.LessonStatusEnum;
import com.dingup.paike.enums.PkLessonUserTypeEnum;
import com.dingup.paike.model.pk.PkLessonInfo;

import java.util.Map;

/**
 * Created by wancheng on 2018/10/24.
 */
public class PkLessonInfoDTO extends PkLessonInfo implements Comparable {

    private Integer pkLessonId;

    private String className;

    private LessonStatusEnum lessonStatus;

    private String teacherName;

    private Float classHour;

    private String name;

    private String time;

    private String dayTime;

    private Boolean ifPast;

    private Boolean ifOnline;

    private String weekDay;

    private String day;

    private Boolean ifGoingToClass = false;

    private String urlForClassIn;

    private String userId;

    private String userName;

    private String dateTimeType;

    private Boolean ifOnlineLesson;

    private Integer classId;

    private PkLessonUserTypeEnum userType;

    private Map<String, String> exam;

    public String getSubjectGroup() {
        return super.getSubjectName() + this.teacherName;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getWeekDay() {
        return weekDay;
    }

    public void setWeekDay(String weekDay) {
        this.weekDay = weekDay;
    }

    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getDayTime() {
        return dayTime;
    }

    public void setDayTime(String dayTime) {
        this.dayTime = dayTime;
    }

    public Boolean getIfPast() {
        return ifPast;
    }

    public void setIfPast(Boolean ifPast) {
        this.ifPast = ifPast;
    }

    public Boolean getIfOnline() {
        return ifOnline;
    }

    public void setIfOnline(Boolean ifOnline) {
        this.ifOnline = ifOnline;
    }

    public Boolean getIfGoingToClass() {
        return ifGoingToClass;
    }

    public void setIfGoingToClass(Boolean ifGoingToClass) {
        this.ifGoingToClass = ifGoingToClass;
    }

    public String getUrlForClassIn() {
        return urlForClassIn;
    }

    public void setUrlForClassIn(String urlForClassIn) {
        this.urlForClassIn = urlForClassIn;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public PkLessonUserTypeEnum getUserType() {
        return userType;
    }

    public void setUserType(PkLessonUserTypeEnum userType) {
        this.userType = userType;
    }

    public LessonStatusEnum getLessonStatus() {
        return lessonStatus;
    }

    public void setLessonStatus(LessonStatusEnum lessonStatus) {
        this.lessonStatus = lessonStatus;
    }

    public Float getClassHour() {
        return classHour;
    }

    public void setClassHour(Float classHour) {
        this.classHour = classHour;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getDateTimeType() {
        return dateTimeType;
    }

    public void setDateTimeType(String dateTimeType) {
        this.dateTimeType = dateTimeType;
    }

    public Integer getPkLessonId() {
        return pkLessonId;
    }

    public void setPkLessonId(Integer pkLessonId) {
        this.pkLessonId = pkLessonId;
    }

    @Override
    public Boolean getIfOnlineLesson() {
        return ifOnlineLesson;
    }

    @Override
    public void setIfOnlineLesson(Boolean ifOnlineLesson) {
        this.ifOnlineLesson = ifOnlineLesson;
    }

    @Override
    public Integer getClassId() {
        return classId;
    }

    @Override
    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    public Map<String, String> getExam() {
        return exam;
    }

    public void setExam(Map<String, String> exam) {
        this.exam = exam;
    }

    @Override
    public int compareTo(Object o) {
        PkLessonInfoDTO o1 = (PkLessonInfoDTO) o;
        if (this.getBeginTime().after(o1.getBeginTime())) {
            return 1;
        } else {
            return -1;
        }
    }
}
